package com.yunsc.order.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import com.yunsc.store.entity.YunscUserEntity;
import lombok.Data;

import java.io.Serializable;

/**
 * 会员充值订单表
 * 
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-22 11:35:51
 */
@Data
@TableName("yunsc_recharge_order")
public class YunscRechargeOrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 订单ID
	 */
	@TableId
	private Integer orderId;
	/**
	 * 订单号
	 */
	private String orderNo;
	/**
	 * 用户ID
	 */
	private Integer userId;
	/**
	 * 充值方式(10自定义金额 20套餐充值)
	 */
	private Integer rechargeType;
	/**
	 * 充值套餐ID
	 */
	private Integer planId;
	/**
	 * 用户支付金额
	 */
	private String payPrice;
	/**
	 * 赠送金额
	 */
	private String giftMoney;
	/**
	 * 实际到账金额
	 */
	private String actualMoney;
	/**
	 * 支付方式(微信/支付宝)
	 */
	private String payMethod;
	/**
	 * 支付状态(10待支付 20已支付)
	 */
	private Integer payStatus;
	/**
	 * 付款时间
	 */
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private Integer payTime;
	/**
	 * 第三方交易记录ID
	 */
	private Integer tradeId;
	/**
	 * 来源客户端 (APP、H5、小程序等)
	 */
	private String platform;
	/**
	 * 商城ID
	 */
	private Integer storeId;
	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Integer createTime;
	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private Integer updateTime;

	@TableField(exist = false)
	@JsonInclude(JsonInclude.Include.NON_NULL)
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private YunscUserEntity user;

}
